package com.example.mvplogin.database;


import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity
public class Student {
    //自增长的key
    @PrimaryKey(autoGenerate = true)
    int id =0;

    //使用别名,此处第一个name是关键字
    @ColumnInfo(name = "name")
    String name;

    //使用别名,叫age
    @ColumnInfo(name="age")
    int age;

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
}
